
from xml.etree.ElementTree import XML
import socket


host = '10.0.1.11'
port = 55781

# Make a UDP connection to the Debugging Application XML Broadcast
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
             
s.connect((host,port))
print(s.getsockname())
print(s.getpeername())

# Make a TCP connection to the Debugging Application Status Monitor
n = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
n.connect((host,18995))

while 1:
    
    dataUdp, addrUdp = s.recv(4096) #Program stalls here waiting for XML data
    event = XML(dataUdp)
    pointData = list(event.iter())
    for element in pointData:
        print(element.tag)

s.close()


